local skel = fk.CreateSkill {
  name = "lb__jingguan",
}

Fk:loadTranslationTable {
  ["lb__jingguan"] = "荆冠",
  [":lb__jingguan"] = "准备阶段，你可以失去1点体力，若如此做，本回合你使用【杀】的次数+1且使用牌无距离限制；若此时你的体力值为场上唯一最少，你回复1点体力。",

  ["#lb__jingguan_delay"] = "荆冠",
  ["@@lb__jingguan-turn"] = "荆冠",

  ["$lb__jingguan1"] = "我向一朵玫瑰起誓。",
  ["$lb__jingguan2"] = "遵循纯美骑士的职责。 ",
}

skel:addEffect(fk.EventPhaseStart, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and player.phase == Player.Start
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:loseHp(player, 1, skel.name)
    if not player.dead then
      room:addPlayerMark(player, MarkEnum.BypassDistancesLimit .. "-turn")
      room:addPlayerMark(player, MarkEnum.SlashResidue .. "-turn")
      if table.find(room:getOtherPlayers(player), function(p)
            return p.hp <= player.hp
          end) == nil then
        room:recover({
          who = player,
          num = 1,
          recoverBy = player,
          skillName = skel.name,
        })
      end
    end
  end,
})

return skel
